<!-- /* Description for file.
 *客户管理添加
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/companymanages
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张朋2011年0714
 * @lastmodified  张朋2011年0714
 -->
 
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Customer Managements');//一级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('合并客户',true).'&nbsp;&nbsp;&nbsp;'.$thedetail['Companymanage']['name']);//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->

<script type="text/javascript">
$(function(){
	$(".addsubmit").click(function(){
		if($(".TextBoxE1").val() == ""){
			window.close();
			return false;
		} else {
			//alert("submit"); 
			$("#f").submit();
		}
	});
	$("#select").change(function(){
		var str = $("#select").find("option:selected").text();
		var sid = $("#select").find("option:selected").val();
		if(str == "不合并")
		{
			str = "";
		}
		$("#connect").html("<a target='_blank' href='<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetail/" + sid + "'>" + str + "</a>"); 
	});
});
</script>


<?php echo $form->create('Companymanage',array('action'=>'merge','type'=> 'post','id'=>'f'));?>

<?php
	echo $form->hidden('ids',array('value'=>$ids));
?> 
<div class="tabflex">
<table width="100%" border="0">
	<tr>
	<td width="30%" align="right">
		合并到：&nbsp;&nbsp;&nbsp;
		<?php $options = array();
			foreach($companies as $v => $company)
			{
				$options[$company['Companymanage']['id']] = $company['Companymanage']['name'];
			}
			echo $form->input('mergeid',array('empty' =>'不合并','id'=>'select','options'=>$options,'label'=>false,'div'=>false,'class'=>'TextBoxE1'));		
		?>
		</td>
		<td id="connect" width="15%"></td>
		<td align="right">
				<?php 
							echo "<input type='button' class='addsubmit' value='确定'/>";
				?>
		</td>
	</tr>
</table>
</div>


<?php echo $form->end();?>

<table id="flex" style="display: none"></table><br></br>